Repository navigation
Conversation
…olated Adds a reference section for the 5.3.0 root-config entry keys `isolated` and `branchedDatabases`, documents `threads.maxIsolated` and `tls.unixDomainSockets`, corrects the multiple-applications guide for isolated apps and forks, and adds an isolated-applications entry to the 5.3 release notes. States the known issue that a package or by_ref deploy ignores `branchedDatabases` on 5.3.0/5.3.1 (harper#3071). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBm5NTzK5QzDt8rbhTJT9G Dispatch-Task: documentation-branched-isolated-preview-deploys
`tables` follows only a fork of `data`; the hand-edited workaround must cover every node; the MQTT socket carries MQTT; the default heap limit has a 512 MB floor; an already-live activation retry restarts every worker; the unique-host rule is Fabric's. Drops the host-manager link, which is an internal repository. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBm5NTzK5QzDt8rbhTJT9G Dispatch-Task: documentation-branched-isolated-preview-deploys
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBm5NTzK5QzDt8rbhTJT9G Dispatch-Task: documentation-branched-isolated-preview-deploys
There was a problem hiding this comment.
Code Review
This pull request updates the documentation for Harper v5.3.0 to introduce two new features: Isolated Applications, which run in dedicated worker threads, and Branched Databases, which provide private, durable database forks. The review feedback focuses on improving readability and formatting, specifically recommending that the component not be used at the start of paragraphs in running prose, and that critical security, replication, and data integrity warnings be split into separate, distinct sentences to enhance their visibility.
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-715 This preview will update automatically when you push new commits. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBm5NTzK5QzDt8rbhTJT9G Dispatch-Task: documentation-branched-isolated-preview-deploys
…' listener Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBm5NTzK5QzDt8rbhTJT9G Dispatch-Task: documentation-branched-isolated-preview-deploys
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-715 This preview will update automatically when you push new commits. |
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-715 This preview will update automatically when you push new commits. |
dawsontoth
left a comment
There was a problem hiding this comment.
Makes sense. It's all a bit complicated for people to set up unfortunately, but I think we can improve it over time to be simpler for people with a few mechanisms.
Stacked on Deploying from CI: lead with OIDC, and correct the deploy reference where it disagrees with Harper. The base branch is #713's branch, so this diff shows only the changes added here.
⊙ Problem
Harper 5.3.0 shipped two keys for an application's root-config entry,
isolated(harper#2524) andbranchedDatabases(harper#2352, #2523, #2426, #2517), plus athreads.maxIsolatedsetting. None of them has reference docs. The multiple-applications guide says every co-located application shares the worker threads, which is no longer true for an isolated application. The 5.3 release notes have no entry for isolated application threads.The CI guide also needs a recipe for isolated deployments and a preview for each PR. These previews deliberately share the cluster databases; database forks are a later enhancement.
Checking the docs against a local 5.3.0 turned up a bug: an application deployed by
packageorby_refignoresbranchedDatabasesand reads and writes the base databases. It is filed as Apackagedeploy'sbranchedDatabasesis ignored at load, so the application runs on its base databases, and a fix is dispatched.The per-PR recipe is included with shared databases, following the maintainer's decision. It omits
branchedDatabaseswhile harper#3071 is open and explains that preview writes, schemas, instance-wide roles, and background work affect the shared instance. Fabric host registration and private-source credential grants are explicit prerequisites.💡 Solution
deploying-from-ci.mdxadds isolated deployment options for the existing release workflows and a per-PR workflow using pinned head commits, unique projects/hosts, and cleanup on closure or retargeting. It uses a default-branch-pinned OIDC policy and no PR checkout, reconciles current PR state and base, cleans each configured node independently with a presence check and worker-aware restart, verifies removal, and reports failed targets. It documents direct node URLs and their OIDC audiences, approval-gated cleanup, routing, capacity, private-source provisioning, shared data, and the later branching fix.A new reference section in
reference/components/applications.mdcovers:Look hardest at Reaching an isolated application. It states the routing caveat from harper#2757: a request to Harper's own ports, even one addressed to the application's host, is answered by the shared workers. Also check the known-issue warning for harper#3071.
threads.maxIsolatedinoptions.md: the default of8, the409past the cap, and that dedicated threads are added tothreads.countand count when Harper divides memory into the default heap limit (which has a 512 MB floor). Alsotls.unixDomainSockets, which isolation requires and which had no entry.multiple-applications.mdxnow says that worker threads are shared unless an application is isolated, and that an isolated application's exports don't collide with the shared workers' exports. A new subsection, A private fork of a database, sits under the namespacing section.5.3.mdgets an Isolated Applications entry next to Branched Databases, and a known-issue paragraph for harper#3071 and harper#3044.reference/components/javascript-environment.mddistinguishes shared data from per-worker API objects and fork-aware imports.reference/components/module-loading.mdqualifies shared globals and fork resolution under the default loader.reference/http/overview.mdlimits export sharing to applications loaded in the same worker.reference/operations-api/operations.mdstates restart/drop scope and cluster cleanup limits, documents the v5.3.0restart_service.scopeoption and the thread-response fields used by cleanup.reference/components/plugin-api.mdqualifies plugin startup and shutdown as occurring in workers that load the application.reference/components/extension-api.mdqualifies resource and protocol extension callbacks for isolated applications.⚖️ Alternatives
pull_request_targetplusworkflow_refpinned tomainprevents a PR from changing the privileged runner workflow. It never checks out PR code. The source preview still executes that code on Harper, so the guide limits the recipe to trusted same-repository PRs.Product and architecture tour
One preview per PR, with shared data
What happens when a PR opens, changes, or closes?
Preview lifecycle
my-app-pr-Nin a dedicated worker.Separate workers, shared database
The proxy chooses an application's worker, while each application reaches the shared databases.
Worker isolation and database branching are independent
Which behavior should an operator rely on today?
The reference documents worker admission, routing, restart scope, and cleanup separately from database forks.
threads.maxIsolatedbounds dedicated workers. On 5.3.0 and 5.3.1 package deploys can isolate workers but ignorebranchedDatabases; the current manual payload workaround remains documented with its per-node caveat.Where each claim comes from (Harper
v5.3.0,726dd1e)isolatedis a boolean;branchedDatabasesisstring[] | true;truetakes every database exceptsystemthat exists at loadcomponents/Application.ts:94-112,resources/branchDatabase.ts:890-896system,/,\,.,.., duplicates) are checked at deploy (400) and at loadApplication.ts:262-286,components/operationsValidation.js:565-576branchedDatabasesin an app's ownconfig.yamlfails its loadcomponents/componentLoader.ts:854-862branchedDatabases(harper#3071)componentLoader.ts:865and:1000-1016host/urlPath/branchedDatabases/isolated; omittingisolatedkeeps it,falseremoves itcomponents/operations.js:868-885isolated→400; admission refusal →409; topology unavailable →503; peers skip admissionoperations.js:636-690operations.js:942-946,server/threads/manageThreads.js:716-7318; socket name encodingserver/threads/isolatedApplications.ts:21,:63-77,:113-147server/threads/socketRouter.ts:99-115,:137-175server/threads/threadServer.js:350-358manageThreads.js:531-532,socketRouter.ts:101restart_servicescope; an already-live activation retry restarts every workerbin/restart.ts:221-237,operations.js:946threadServer.js:705-741resources/branchDatabase.ts:470-498,:345,resources/databases.ts:1642-1671nativeloader, a missing database, emptyblobPaths, or a store name over 250 charactersbranchDatabase.ts:323-330,:874-912databases,describe_all, or replication)databases.ts:1893-1897harperimports are scoped, andtablesfollows only a fork ofdata; the bare globals reach the baseApplication.ts:105-108,security/jsLoader.ts:878-907drop_componentremoves forks only withrestart: true, otherwise keeps them and says sooperations.js:559-560,:1577-1620restartv5.3.0replication/replicator.ts:907-950, plus the scope-private row abovemainsrc/helpers/symphony.js_wildcardApplicationHosts, from host-manager#224✅ Verification
npm run format:check: clean.npm run build: passes.harper@5.3.0from npm, following AGENTS.md: a scratchHOMEandROOTPATH,threads.count: 2,threads.maxIsolated: 1,http.securePortset, andtls.unixDomainSockets: true.isolated=true(CLI and raw API)400'isolated' is only supported for package deployments; …deploy_component package=… isolated=true branchedDatabases='["data"]' host=pr-1.example.test restart=trueisolated: true(boolean) andbranchedDatabases: [data](list). A dedicated thread, andapp-my%2Dapp%2Dpr%2D1-<port>.sockwrong version numberHoston the shared portmaxIsolated409… already runs 1 isolated application(s) (threads.maxIsolated)system_informationthreads{threadId: 3, application: 'pkg-2'}beside 2 pool threadsrestart_servicewithscope: "pkg-2"branchedDatabasesroot/database/`branches`/pay-1/dataholds the base's rows. Its writes do not reach the basebranchedDatabasesin the app'sconfig.yaml…declares branchedDatabases in its own config…. The deploy itself still reports successdrop_componentwithout restart, on an app with a fork…left in place; drop it again with restart: true…. Fork kept. The dedicated worker kept serving until the next restartdrop_component restart=true/ firstdrop_component restart=trueAdditional CI-guide validation (Harper 5.3.0):
by_refdeployments against a local git fixture. Preview deploy/drop and both cleanup reads worked with the four-operation allowlist. The finalworkflow_ref/pull_request_targettrust policy was also accepted by Harper 5.3.0.tls_unixDomainSocketssetting was enabled.tls_unixDomainSocketsflag survivedset_configuration logging_level=warn replicated=falseand aHARPER_CONFIGmerge/restart; the isolated worker and socket were present afterward without the legacy environment flag.retireComponentDirectory(...).discard()before the restart decision (operations.js:1549-1575); discard prunes dormant builds and reclaims deployment records, with failures logged (Application.ts:3871-3916). This also covers a files-onlyrestart=falsedrop; journaled records may remain.v5.1.0^{commit}togit ls-remote origin refs/tags/v5.1.0at001bf7b9c55963f7dcd938087acd0047d19b8a62; the tagged source defines the socket setting. The isolated/branching v5.3.0 surface was likewise checked against the fetched release tag.npm run format:write,npm run format:check, andnpm run buildpassed. The review CLI's generic recovery check reportsno-restart-testbecause it requires a touched repository test; this docs repository has no automated suite. The scratch restart/cleanup checks above are external validation, not committed tests.Not exercised end to end: GitHub's live OIDC exchange, live Fabric DNS/TLS routing, private-source grants on Pro/Fabric, or Pro multi-node replication. The two-instance cleanup check used independent Core instances with direct node calls, not a replicated cluster. GitHub trigger and environment behavior were checked against GitHub's event reference.
Not verified locally (source only):
curl --unix-socket.nativeloader, emptyblobPaths, 250-character name, and damaged-fork failures.Refs harper#642, harper#3071
Original reference work: Claude Opus 5.5. CI preview guide and consistency fixes added by Codex in this revision.
Related PRs: #713 overlaps, #671 independent, #676 independent, #710 independent, #679 independent, #683 independent, #691 independent, #697 independent, #709 independent, #712 independent, #707 independent, #714 independent
Dispatch: task
documentation-branched-isolated-preview-deploys· queued by unknown · ran by claude/opus/xhigh · worker kzyp-xps-1Review-Coverage: authored=unknown; ran=none; rounds=1 @ f9ce6ad
Review-Attention: deep ~25m (raised: unmeasured diff) @ f9ce6ad